
<div class="item-holder" style="border:1px solid #ccc;background:#eee;width:500px;margin-bottom:4px;">

	<div id="dialog_{$count}" title="Beschreibung ändern" style="display:none;">
		<fieldset>
			<label for="name">Beschreibung</label>
			<input type="text" name="obj[{$obj.obj_id}][{$fieldname}][descr][]" id="SortDescr{$fieldname}_{$obj.obj_id}_description_{$count}" value="{$item.file_descr}" class="text ui-widget-content ui-corner-all"  style="width:250px;color:#333;"/>
		</fieldset>
	</div>

	<input type="hidden" name="obj[{$obj.obj_id}][{$fieldname}][name][]" id="SortFile{$fieldname}_{$obj.obj_id}_filename_{$count}" value="{$item.file_name}"/>
	<input type="hidden" name="obj[{$obj.obj_id}][{$fieldname}][dir][]" id="SortDir{$fieldname}_{$obj.obj_id}_dir_{$count}" value="{$item.file_dir}"/>
{*	<input type="hidden" name="obj[{$obj.obj_id}][{$fieldname}][][descr]" id="SortDescr{$fieldname}_{$obj.obj_id}_description_{$count}" value="{$item.file_descr}"/>*}
	<div style="float:left;width:20px;padding:4px;"><img src="img/icon-arrow-drag.gif" border="0" /></div>
	<div style="float:left;padding:4px;border-left:1px solid #ccc;">
		{$item.file_dir|truncate:15:"...":true}<br />
		{$item.file_name}<br />
		<span  id="Descr{$fieldname}_{$obj.obj_id}_description_{$count}">{if ''== $item.file_descr}{$smarty.config.Forms_files_no_descr}{else}{$item.file_descr}{/if}</span><br />
	</div>
	<div style="float:right;padding:4px;"> 
{*
		<a href="javascript:void(0);" onclick="{strip}{literal}
try {
		{/literal}
	 	{literal}
		$('#dialog{/literal}_{$count}{literal}').dialog({
			bgiframe: true,
			autoOpen: true,
			height: 120,
			modal: true,
			buttons: {
				'Speichern': function() {
						{/literal}
					 	xajax.$('Descr{$fieldname}_{$obj.obj_id}_description_{$count}').innerHTML = xajax.$('SortDescr{$fieldname}_{$obj.obj_id}_description_{$count}').value;
					 	{literal}
						$(this).dialog('close');
				}
			},	
			close: function() {
				$(this).dialog('close');
			}
		});
} catch(ex) {console.log(ex);}
		{/literal}{/strip}" class="edit" >
			<img src="/ccds_library/famfamfam/icons/page_edit.png" border="0" />
		</a>*}
		<a href="javascript:void(0);" onclick="{strip}{literal}
				try {
				$('<div/>').xWindow(
					'prompt', 
					{
						title: '{/literal}{$smarty.config.Forms_files_change_descr}{literal}',
						content:''
					},
					function(val, $elem){
						xajax.$('{/literal}SortDescr{$fieldname}_{$obj.obj_id}_description_{$count}{literal}').value = val;
						xajax.$('{/literal}Descr{$fieldname}_{$obj.obj_id}_description_{$count}{literal}').innerHTML = val;
						this.destroy();
					}
				).find('input').val(xajax.$('{/literal}SortDescr{$fieldname}_{$obj.obj_id}_description_{$count}{literal}').value);
			}catch(ex) {alert(ex);}
		{/literal}{/strip}" class="edit" >
			<img src="/ccds_library/famfamfam/icons/page_edit.png" border="0" />
		</a>
		<br />

		<a href="javascript:void(0);" onclick="{strip}{literal}
			foo=function(elm) {
				tmp = elm.parentNode.parentNode.parentNode;
				tmp.removeChild(elm.parentNode.parentNode);
			};foo(this);
			{/literal}{/strip}"class="remove" >
			<img src="/ccds_library/famfamfam/icons/bin.png" border="0" />
		</a>
	</div>


	<div style="clear:both;" /></div>

{*

	<div style="float:left;width:20px;"  onclick="{strip}{literal}
			try {
			$('<div/>').xWindow(
				'prompt', 
				{
					title: '{/literal}{$smarty.config.Forms_gallery_change_descr}{literal}',
					content:''
				},
				function(val, $elem){
					xajax.$('{/literal}SortDescr{$fieldname}_{$obj.obj_id}_description_{$count}{literal}').value = val;
					xajax.$('{/literal}Descr{$fieldname}_{$obj.obj_id}_description_{$count}{literal}').innerHTML = val;
					this.destroy();
				}
			).find('input').val(xajax.$('{/literal}SortDescr{$fieldname}_{$obj.obj_id}_description_{$count}{literal}').value);
		}catch(ex) {alert(ex);}
	{/literal}{/strip}" class="edit" style="background:url(/ccds_library/famfamfam/icons/image_edit.png) top left no-repeat;">
	<img src="/ccds_library/famfamfam/icons/page_edit.png" />
	</div>
	<div style="float:left;width:20px;" onclick="{strip}{literal}
	foo=function(elm) {
		tmp = elm.parentNode.parentNode;
		tmp.removeChild(elm.parentNode);
	};foo(this);
	{/literal}{/strip}"class="remove" style="background:url(/ccds_library/famfamfam/icons/bin.png) top left no-repeat;">
		<img src="/ccds_library/famfamfam/icons/bin.png" />
	</div>
	
	<div style="float:left;width:40px;">{$item.file_dir|truncate:15:"...":true}</div>
	<div style="float:left;width:300px;">{$item.file_name}</div>

	<div style="float:left;width:150px;" id="Descr{$fieldname}_{$obj.obj_id}_description_{$count}">
	{if '' != $item.file_descr}
		{$item.file_descr}
	{else}
		{$smarty.config.Forms_gallery_no_descr}
	{/if}
	</div>

	<br style="clear:both;" />
	*}
</div>	
